* {
    margin: 0;
    padding: 0;
}
body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2b2b2b;
}
.container {
    display: flex;
    flex-direction: column;
    label {
        position: relative;
        margin: 5px 0;
        cursor: pointer;
        span {
            position: relative;
            display: block;
            width: 80px;
            height: 40px;
            background-color: #222;
            border-radius: 40px;
            box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.2), inset 0 2px 2px rgba(0, 0, 0, 0.2), inset 0 -1px 1px rgba(0, 0, 0, 0.2);
        }
        .indicator {
            position: absolute;
            left: 0;
            top: 0;
            width: 40px;
            height: 40px;
            background: linear-gradient(to bottom, #444, #222);
            border-radius: 50%;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
            transform: scale(0.9);
            transition: 0.5s;
            &::before {
                content: '';
                width: 5px;
                height: 5px;
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
                background-color: #f00;
                border-radius: 50%;
                box-shadow: 0 0 2px #f00, 0 0 5px #f00, 0 0 10px #f00, 0 0 15px #f00, 0 0 20px #f00, 0 0 25px #f00, 0 0 30px #f00, 0 0 35px #f00;
                transition: 0.5s;
            }
        }
        input:checked ~ .indicator {
            left: 40px;
            &::before {
                background-color: #0f0;
                box-shadow: 0 0 2px #0f0, 0 0 5px #0f0, 0 0 10px #0f0, 0 0 15px #0f0, 0 0 20px #0f0, 0 0 25px #0f0, 0 0 30px #0f0, 0 0 35px #0f0;
            }
        }
    }
}
